HOME
GIS
AGROffice
- DokuPlant Agriculture
- FORESToffice
- HuntinGIS
- CommunityGIS
- Fire brigade
- PipeGIS
- Environment / Riskmanagement
- Planning rural areas
- SaRAM
LoGIStic
Data
other Projects
Development environment
Development environment
About ActiveX
ActiveX is the synonym for the growing collection of reusable software elements that satisfy the needs of modern software development. Using ActiveX components, software developers are able to implement prefabricated software elements in there applications. With these new technology you can reduce the time of your development process. Many Programming languages are supporting the ActiveX technology (Visual Basic, Visual C++, PowerBuilder, Delphi, …).
Using ActiveX you have to distinguish two expressions: Controls and container. A control is a reusable software component, with which you can develop new or extend existing applications. A container includes one or more controls. The protocol that the controls are using for communication is called ActiveX and is based on the Component Object Model (COM).
AXWinGIS is an ActiveX control.
WinGIS Canvas
The Canvas solution enables you to insert a WinGIS graphic window into an other application. Menu bar and toolbar of WinGIS are switched off, the graphic control happens by the AXWinGIS command set. In this case WinGIS is started as background application before the connection between the database application and WinGIS is established.
How to start
1. Register the AXWinGIS.ocx
Receiving the AXWinGIS.ocx without a setup program, you have to register the control manually with the registration tool from Microsoft (regsvr32.exe).Copy the AXWinGIS.ocx on your HDD and run the "Regsvr32.exe" program in order to register the AXWinGIS.ocx
2. Embed the control into your application
This procedure depends on your development environment.
3. Changing the control properties
After having inserted the control go to the Properties of the control an specify an unique application ID. This parameter is then transmitted to WinGIS when your application is sending the "DoConnect" or "DoConnectEx" command. If you want your application to set up a communication after heaving started you must set the “bActive” property "TRUE".
4. Starting the connection
Associate the method "DoConnect" or "DoConnectEx" with one of your forms or controls.
Visual Basic example for using AXWinGIS
Note: Before you make a connection between Application and WinGIS, WinGIS has to be started before.
Start a new “Standard-Exe” project. “Form1” is created by default.
Add the Microsoft ADO Data Control (“Adodc1”) to the “Form1”.
Add the Microsoft DataGrid Control (“DataGrid1”) to the “Form1”.
Add the AXWinGIS control (AXWingis1) to the “Form1”.
Click on the Adodc1 symbol and set the “ConnectionString” property.
Now choose the corresponding database of a WinGIS project.
Set the property “RecordSource” to the table name.
Set the property “sAppName” of the AXWinGIS control to an unique name.
Set “bActive” on “TRUE” and you should even set “bUseCOM” on “TRUE”.
Commands to set up a connection and load a WinGIS project:
AXWingis1.DoConnect "TextAppl1", "None"
AXWingis1.DoOpenProject “c:\…\test.amp”
Commands to close the project, close WinGIS and cancel a connection:
AXWingis1.DoCloseProject “c\…\test.amp”
AXWingis1.DoCloseGIS
AXWingis1.DoDisconnect
Commands to select an GIS object via “ProgisID” *) from the database:
Dim ListHandle
ListHandle = AXWingis1.CreateList
AXWingis1.AddStringParam ListHandle, DataGrid1.Columns(ProgisIDField).Text
Axwingis1.DoZoomObjects ListHandle, True
AXWingis1.DeleteList ListHandle
*) ProgisID is a numeric value which represents the connection between a GIS object and the corresponding record in a database table.
ActiveX is the synonym for the growing collection of reusable software elements that satisfy the needs of modern software development. Using ActiveX components, software developers are able to implement prefabricated software elements in there applications. With these new technology you can reduce the time of your development process. Many Programming languages are supporting the ActiveX technology (Visual Basic, Visual C++, PowerBuilder, Delphi, …).
Using ActiveX you have to distinguish two expressions: Controls and container. A control is a reusable software component, with which you can develop new or extend existing applications. A container includes one or more controls. The protocol that the controls are using for communication is called ActiveX and is based on the Component Object Model (COM).
AXWinGIS is an ActiveX control.
WinGIS Canvas
The Canvas solution enables you to insert a WinGIS graphic window into an other application. Menu bar and toolbar of WinGIS are switched off, the graphic control happens by the AXWinGIS command set. In this case WinGIS is started as background application before the connection between the database application and WinGIS is established.
How to start
1. Register the AXWinGIS.ocx
Receiving the AXWinGIS.ocx without a setup program, you have to register the control manually with the registration tool from Microsoft (regsvr32.exe).Copy the AXWinGIS.ocx on your HDD and run the "Regsvr32.exe" program in order to register the AXWinGIS.ocx
2. Embed the control into your application
This procedure depends on your development environment.
3. Changing the control properties
After having inserted the control go to the Properties of the control an specify an unique application ID. This parameter is then transmitted to WinGIS when your application is sending the "DoConnect" or "DoConnectEx" command. If you want your application to set up a communication after heaving started you must set the “bActive” property "TRUE".
4. Starting the connection
Associate the method "DoConnect" or "DoConnectEx" with one of your forms or controls.
Visual Basic example for using AXWinGIS
Note: Before you make a connection between Application and WinGIS, WinGIS has to be started before.
Start a new “Standard-Exe” project. “Form1” is created by default.
Add the Microsoft ADO Data Control (“Adodc1”) to the “Form1”.
Add the Microsoft DataGrid Control (“DataGrid1”) to the “Form1”.
Add the AXWinGIS control (AXWingis1) to the “Form1”.
Click on the Adodc1 symbol and set the “ConnectionString” property.
Now choose the corresponding database of a WinGIS project.
Set the property “RecordSource” to the table name.
Set the property “sAppName” of the AXWinGIS control to an unique name.
Set “bActive” on “TRUE” and you should even set “bUseCOM” on “TRUE”.
Commands to set up a connection and load a WinGIS project:
AXWingis1.DoConnect "TextAppl1", "None"
AXWingis1.DoOpenProject “c:\…\test.amp”
Commands to close the project, close WinGIS and cancel a connection:
AXWingis1.DoCloseProject “c\…\test.amp”
AXWingis1.DoCloseGIS
AXWingis1.DoDisconnect
Commands to select an GIS object via “ProgisID” *) from the database:
Dim ListHandle
ListHandle = AXWingis1.CreateList
AXWingis1.AddStringParam ListHandle, DataGrid1.Columns(ProgisIDField).Text
Axwingis1.DoZoomObjects ListHandle, True
AXWingis1.DeleteList ListHandle
*) ProgisID is a numeric value which represents the connection between a GIS object and the corresponding record in a database table.